import { createRouter, createWebHashHistory } from 'vue-router'

export const routes = [
	{
		path: '/',
		redirect: '/pageOne',
	},
	{
		path: '/pageOne',
		component: () => import('@/pages/pageOne.vue'),
	},
	{
		path: '/pageTwo',
		component: () => import('@/pages/pageTwo.vue'),
	},
]

const router = createRouter({
	scrollBehavior: () => ({ left: 0, top: 0 }),
	history: createWebHashHistory(),
	routes,
})

router.beforeEach((to, from, next) => {
	console.log('to', to)
	console.log('from', from)
	next()
})

export default router
